<template>
  <div>
      <!-- <div v-for="(item,index) in array" :key="item.name" style="display: flex; margin-top: 10px;" @click="getIndex(item,index)" >
          <div style="font-size: 15px;">{{item.name}}</div>
          <el-radio-group :v-model="radio[index]" style="margin-top: 5px; margin-left: 20px;">
            <el-radio
              :label="subitem.value"
              :key="subitem.value"
              v-for="subitem in item.content">
            {{ subitem.label }}
            </el-radio>
          </el-radio-group>
      </div> -->
<div v-for="(item,index) in array" :key="item.name" class="radio">
  <span>{{item.name}}</span>
    <el-radio-group v-model="radio[index]" >
      <el-radio
              v-for="subitem in item.content"
              :label="subitem.value"
              :key="subitem.value">
            
            {{ subitem.label }}
      </el-radio>
    </el-radio-group>
</div>

  </div>
</template>

<script>
  export default {
    data () {
      return {
        radio: ['0','0','0','0'],
        array:[{
          name:"材料",
          content:[{
              label:"复合材料",
              value:"1"
              },
              {
              label:"钛合金",
              value:"2"},
              ]
        },
        {
          name:"结构",
          content:[{
              label:"整环式",
              value:"1"
              },
              {
              label:"分半式",
              value:"2"},
              ]
        },
        {
          name:"加工工艺",
          content:[{
              label:"铸造",
              value:"1"
              },
              {
              label:"钣金",
              value:"2"},
              {
              label:"化学铣",
              value:"3"},
              {
              label:"分半式",
              value:"4"},
              ]
        },
        {
          name:"表面处理",
          content:[{
              label:"镀层抛光",
              value:"1"
              },
              {
              label:"哑光喷砂",
              value:"2"},
              ]
        },
      ]
      };
    },
    methods:{
      getIndex(item,index){
        console.log(item);
        console.log(index);
        this.index = index;
        this.radio[index] = item.Array
      }
    }
  }

</script>

<style>
.radio{
  display: flex;
  margin-top: 5px;
  margin-left: 20px;
}

</style>